package cn.tianya.irock.data.model;

import java.util.Date;

import cn.tianya.irock.bll.SiteManager;

public class Template {
	
	private int templateId;
	private int userId;
	private int type;
	private String name;
	private String content = "";
	private Date dateCreated;
	
	public int getTemplateId() {
		return templateId;
	}
	public void setTemplateId(int templateId) {
		this.templateId = templateId;
	}
	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getContent() {
		if (content.length() == 0) {
			content = SiteManager.getTemplateContent(templateId);
		}
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Date getDateCreated() {
		return dateCreated;
	}
	public void setDateCreated(Date dateCreated) {
		this.dateCreated = dateCreated;
	}
	
	
}
